using MinoChat.Services.Interfaces;
using MinoChat.Views.Dialogs;

namespace MinoChat.Services;

public class UserInputService : IUserInputService
{
    public string? RequestInput(string prompt, string title, string defaultText = "")
    {
        var inputBox = new InputBox(prompt, title, defaultText);
        var result = inputBox.ShowDialog();
        // 返回的属性，而不是控件的值
        return result == true ? inputBox.UserInput : null;
    }
}